From: Jan Beulich Date: Fri, 31 May 2019 09:39:49 +0000 (+0200) Subject: VT-d: change bogus return value of intel_iommu_lookup_page() X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2148 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=2a4c343c5baa241ea5d8685ac96989543ea67410;p=xen.git VT-d: change bogus return value of intel_iommu_lookup_page() The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(), so -ENOMEM simply makes no sense (and its use was probably simply a copy-and-paste effect originating at intel_iommu_map_page()). Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant Acked-by: Kevin Tian --- diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 7b9e09a084..4caf63c7fa 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1870,7 +1870,7 @@ static int intel_iommu_lookup_page(struct domain *d, dfn_t dfn, mfn_t *mfn, if ( !pg_maddr ) { spin_unlock(&hd->arch.mapping_lock); - return -ENOMEM; + return -ENOENT; } page = map_vtd_domain_page(pg_maddr);